//
// Created by 11518 on 2024/11/25.
//

#ifndef MY_APPLICATION_TCPSERVER_H
#define MY_APPLICATION_TCPSERVER_H

#include <sys/types.h>
#include <sys/socket.h>
#include <string>


class Tcpserver {
public:
    int init(const char *ip,int port);
    void unInit();
    void acceptClient();
    int writeData(const char *str,int size);

private:
    int m_SocketFd;
    int m_SocketClient;
    bool m_Connect;
    bool m_IsOpen;
};


#endif //MY_APPLICATION_TCPSERVER_H
